import request from "@/api/http";

export function queryModelList(currentPage, pageSize) {
  return request({
    url: "/model/queryList",
    method: "post",
    data: {
      currentPage: currentPage,
      pageSize: pageSize,
    },
  });
}

export function queryModelListByType(modelType) {
  return request({
    url: "/model/queryListByType",
    method: "get",
    params: {
      modelTypeId: modelType,
    },
  });
}

export function delModel(id) {
  return request({
    url: "/model/delete",
    method: "post",
    data: {
      id: id,
    },
  });
}

export function addModel(model) {
  return request({
    url: "/model/add",
    method: "post",
    data: {
      model: model,
    },
  });
}

export function updateModel(model) {
  return request({
    url: "/model/update",
    method: "post",
    data: {
      model: model,
    },
  });
}
